<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文本框验证</title>
    <style>
        body {
            background-color: aquamarine;
        }
        /* 添加弹窗样式 */
        .auto-close-popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: white;
            border: 1px solid #ccc;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            display: none; /* 初始隐藏 */
        }
    </style>
    </head>
    <body>
         <!-- 添加弹窗元素 -->
    <div id="autoClosePopup" class="auto-close-popup">
         转到<a href="./js1.html">个人简介</a>
        <p>这是一个5秒后自动关闭的弹窗。</p>
    </div>
        <script>

 
        window.onload = function() {
 
            // 显示自动关闭的弹窗
            var popup = document.getElementById('autoClosePopup');
            popup.style.display = 'block';
 
            // 设置5秒后自动关闭弹窗
            setTimeout(function() {
                popup.style.display = 'none';
            }, 5000); // 5000毫秒 = 5秒
        };
        </script>
    </body>
</html>